/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hera.process.config.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.hera.base.domain.BaseDomain;

/**
 *
 * @author cmontes
 */
@Entity
@Table(name = "PARAMETER_DETAIL")
public class ParameterDetail extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "ParameterDetail")
    @TableGenerator(name = "ParameterDetail", table = "sequence", pkColumnName = "seq_name", valueColumnName = "seq_id", pkColumnValue = "PARAMETERDETAIL", allocationSize = 1)
    @Column(name = "ID_PARAMETER_DETAIL")
    private Long idParameterDetail;
    private String name;
    private String description;
    @JoinColumn(name = "ID_PARAMETER", referencedColumnName = "ID_PARAMETER")
    @ManyToOne
    private Parameter parameter;
    
    @Column(name = "CODE")
    private String code;
    @Column(name = "VALUE")
    private String value;
    @Column(name = "ORDE")
    private Long order;
    @Column(name="ID_STATUS")
    private String status;

    public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public ParameterDetail() {
    }

    public ParameterDetail(Long idParameterDetail) {
        this.idParameterDetail = idParameterDetail;
    }

    public Long getIdParameterDetail() {
        return idParameterDetail;
    }

    public void setIdParameterDetail(Long idParameterDetail) {
        this.idParameterDetail = idParameterDetail;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Parameter getParameter() {
        return parameter;
    }

    public void setParameter(Parameter parameter) {
        this.parameter = parameter;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idParameterDetail != null ? idParameterDetail.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        
        if (!(object instanceof ParameterDetail)) {
            return false;
        }
        ParameterDetail other = (ParameterDetail) object;
        if ((this.idParameterDetail == null && other.idParameterDetail != null) || (this.idParameterDetail != null && !this.idParameterDetail.equals(other.idParameterDetail))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.hera.process.data.domain2.ParameterDetail[ idParameterDetail=" + idParameterDetail + " ]";
    }

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public Long getOrder() {
		return order;
	}

	public void setOrder(Long order) {
		this.order = order;
	}

    
}
